﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Web;
using System.Web.Mvc;
using COM.Domain;
using SampleApp.Domain;

namespace System.Web.Helpers
{
    public static class SampleDeptLabelExtensions
    {
        public static SysDept SampleDeptLabel(this HtmlHelper helper,string deptCode)
        {
            var deptService = COM.Web.Unity.Instance.GetService<SampleApp.Service.ISysDeptService>();
            var deptList = deptService.GetSysDeptList();
            return KeyValueLabelExtensions.KeyValueLabel(helper, deptCode, deptList, (i => i.DeptCode));
        }
    }
}